package SV_ECV;

import org.apache.http.conn.ssl.X509HostnameVerifier;

import javax.net.ssl.SSLException;
import javax.net.ssl.SSLSession;
import javax.net.ssl.SSLSocket;
import java.io.IOException;
import java.security.cert.X509Certificate;

public class Vulnerable_01 {
    private static X509HostnameVerifier ACCEPT_ALL_HOSTNAMES =
            new X509HostnameVerifier() {
                public void verify(String host, String[] cns, String[] subjectAlts) throws SSLException {
                }
                public void verify(String host, X509Certificate cert) throws SSLException {
                }
                public void verify(String host, SSLSocket ssl) throws IOException {
                }
                public boolean verify(String host, SSLSession session) {
                    return true;
                }
            };
}
